<?php  $this->load->view('admin/file/link_bar');?>
<script>
                function loadPrice(){
                    var category=  document.getElementById('category');
                    category = category.options[category.selectedIndex].value;
                    window.location = "<?php echo base_url() ?>admin/price/view/" + category;
                   // alert(category);
                }
            </script>
		<form method="post" action="<?php echo $this->base_url ?>admin/price/delete" class="form">
		
		<div class="box_function">
		<table width="747" border="0" cellpadding="0" cellspacing="0" class="listproduct" id="listproduct">
				<tr>
					<td class="tilte_list_pro">
						<input name="checkme" class="noborder" onclick="checkDelBoxes(this.form, 'categoryBox[]', this.checked)" type="checkbox">
					</td>
					
					<td class="tilte_list_pro">
						<?php echo lang('name');?>
						
					</td>
					<td class="tilte_list_pro">
						<?php echo lang('file_type');?>
					</td>

					<td class="tilte_list_pro">
						<?php echo lang('size');?> (MB)
					</td>
                    <td class="tilte_list_pro">
						<?php echo $categories?>
					</td>
					<td class="tilte_list_pro">
						<?php echo lang('active');?>
					</td>
					<td class="tilte_list_pro" style="width: 79px;">
						<?php echo lang('action');?>
					</td>
				</tr>
			
				<?php
				for($i = 0; $i < count($rows); $i++){
				$id = $rows[$i]->id_file;
				$name = $rows[$i]->vi_alias;
				$description = round(filesize($rows[$i]->file_name)/1024/1024 , 3);  // MB
				$extend_name = end(explode('.', $rows[$i]->file_name));
				$parent = '';//$pcategories[$i]->code;
				if($parent=='') $parent = '_';
				$enlable = $rows[$i]->active == 1 ? 'checked.jpg' : 'nocheck.jpg';
				//$items .= eval ($this->loadTemplate('admin/file/file_item.tpl'));
                if($i % 2 == 0) $css_class = 'row1';
                            else $css_class = 'row2';
				?>
				<tr onMouseOver="" class="<?php echo $css_class ?>">
					<td class="product center">
						<input name="categoryBox[]" value="<?php echo $id ?>" class="noborder" type="checkbox"></td>
						
					<td class="product" onclick="document.location = '#'">
					<?php echo $name ?>
					</td>
					<td class="product" onclick="document.location = '#'">
					<?php echo $extend_name ?>
					</td>
					<td class="product" onclick="document.location = '#'">
					<?php echo $description ?>	
					</td>
                    <td class="product center" onclick="document.location = '#'">
					----
					</td>
					<td class="product center" onclick="document.location = '#'">
						<a href="<?php echo $id ?>">
							<img src="<?php echo $this->base_url ?>/images/<?php echo $enlable ?>" alt="Enabled" title="Enabled">
						</a>
					</td>
					<td class="product center">
						<a href="<?php echo $this->base_url ?>admin/price/edit/<?php echo $id ?>">
							<img src="<?php echo $this->base_url ?>/images/admin/edit.gif" alt="Edit" title="Edit" border="0">
						</a>
	
						<a href="<?php echo $this->base_url ?>admin/price/delete/<?php echo $id ?>" onclick="return confirm('Delete item #<?php echo $id ?>?');">
						<img src="<?php echo $this->base_url ?>/images/admin/delete.gif" alt="Delete" title="Delete" border="0">
						</a>
					</td>
				</tr>
				<?php
				}
				?>
					
			<tr>
				<td colspan="5">
			<p>
			<input class="button" name="submitDelcategory" value="Delete selection" onclick="return confirm('Delete selected items?');" type="submit">
			</p>
			<p align="center">
			<?php echo $this->pagination->create_links() ?>
			</p>
		</td>
	</tr>

</table>
</div>
		<input name="token" value="ded1f3a9139b6503109bc7811c221485" type="hidden">
		</form>